package com.dsz.du.mealbooking.services;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import com.dsz.du.mealbooking.dao.BookMealDao;
import com.dsz.du.mealbooking.model.MealModel;
import com.dsz.du.mealbooking.model.UserModel;


@Service
public class BookMealServices {
	
	public BookMealServices(){
	}
	
	//Dao
	@Autowired
	@Qualifier("bookMealGAEDao")
	//@Qualifier("bookMealDao") 
	private BookMealDao bookMealDao;
	
	
	public List<MealModel> getOrder(String userId){
		return bookMealDao.listOrder(userId);
	}
	
	public void addOrder(String userId,List<String> mealIds){
		bookMealDao.addOrder(userId,mealIds);
	}
	
	public void addMeal(UserModel userModel){
				
		bookMealDao.addMeal(userModel);
	}

	public void deleteMeal(String userId, String mealIds) {
		bookMealDao.deleteMeal(userId,mealIds);
		
	}	

}
